<template>
  <div class="detailInfo">
    <section v-show="content.summary ">
      <div class="title d-flex space-center middle">
        <div class="line"></div>
        <h4>综合运势</h4>
        <div class="line"></div>
      </div>
      <p>{{ content.summary }}</p>
    </section>
    <section>
      <div class="title d-flex space-center middle">
        <div class="line"></div>
        <h4>事业运势</h4>
        <div class="line"></div>
      </div>
      <p>{{ content.work || content.career }}</p>
    </section>
    <section>
      <div class="title d-flex space-center middle">
        <div class="line"></div>
        <h4>爱情运势</h4>
        <div class="line"></div>
      </div>
      <p>{{ content.love }}</p>
    </section>
    <section>
      <div class="title d-flex space-center middle">
        <div class="line"></div>
        <h4>财富运势</h4>
        <div class="line"></div>
      </div>
      <p>{{ content.money || content.finance }}</p>
    </section>
    <section v-show="content.health">
      <div class="title d-flex space-center middle">
        <div class="line"></div>
        <h4>健康运势</h4>
        <div class="line"></div>
      </div>
      <p>{{ content.health }}</p>
    </section>
    <section v-show="content.mima_text">
      <div class="title d-flex space-center middle">
        <div class="line"></div>
        <h4>年度密码</h4>
        <div class="line"></div>
      </div>
      <h4 class="title">{{ content.mima_title }}</h4>
      <p>{{ content.mima_text }}</p>
    </section>
  </div>
</template>
<script>
export default {
  props: {
    constellation: {
      type: Object,
      default: () => {}
    }
  },
  data () {
    return {
      content: {}
    }
  },
  watch: {
    constellation: {
      handler (val) {
        this.content = {...val}
      },
      deep: true
    }
  }
}
</script>
<style lang="scss" scoped>
.detailInfo {
  section {
    padding: 0 10px;
    margin: 10px 0;
    .title {
      h4 {
        font-size: 18px;
        color: #ffa92d;
        margin: 0 10px;
      }
      .line {
        width: 100px;
        border: 1px solid #eee;
        box-shadow: 3px 3px 5px #ccc;
      }
    }
    .rate {
      margin: 10px 0;
    }
    p {
      margin: 10px 0;
      text-align: justify;
      text-indent: 30px;
      font-size: 16px;
    }
    .title {
      text-align: center;
      font-weight: bold;
      margin: 5px 0;
      font-size: 18px;
    }
  }
}
</style>
